<template>
  <div class="app-container">
    <el-form :inline="true" :model="queryForm" class="demo-form-inline">
      <el-form-item label="角色名称">
        <el-input v-model="queryForm.roleName" placeholder="角色名称"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="queryData">查询</el-button>
      </el-form-item>
    </el-form>
    <hl-table ref="HlTable" :data-url="dataUrl" :query-form="queryForm">
      <el-table-column type="selection" align="center" width="55"></el-table-column>
      <el-table-column align="center" label="ID" prop="roleId" width="55"></el-table-column>
      <el-table-column label="角色名称" prop="roleName"></el-table-column>
      <el-table-column label="操作" align="center" width="100px">
        <template slot-scope="scope">
          <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
        </template>
      </el-table-column>
    </hl-table>
  </div>
</template>

<script>
import HlTable from '@/components/HlTable/index'
export default {
  name: 'RoleList',
  components: { HlTable },
  data() {
    return {
      dataUrl: '/frontend/api/role/tableList',
      queryForm: {}
    }
  },
  watch: {
  },

  methods: {
    handleEdit(index, item) {
    },
    queryData () {
      this.$refs.HlTable.getTable()
    }
  }
}
</script>

